[HVM][SVM] Fix 1/2 to interrupt delivery logic.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 20 Oct 2006 09:09:55 +0000 (10:09 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 20 Oct 2006 09:09:55 +0000 (10:09 +0100)
commitb83b1b4104c6821b4fcb38e78fcbbace21038d8c
treef473f2ea6a92a99729fbd59b62e67b16f62af996
parent6c96f333167552e4ad7bed79250054155fbaef75
[HVM][SVM] Fix 1/2 to interrupt delivery logic.

This patch uses the VINTR intercept to signal the hypervisor when a
guest can take an interrupt.  When guest's interrupts are masked by
EFLAGS.IF or the guests are in an interrupt shadow, we create a 'fake'
virtual interrupt to inject while also enabling the VINTR intercept.
When the guest _can_ take interrupts, the hypervisor will #VMEXIT
on VINTR. The VINTR exit handler then clears the VINTR intercept bit
and clears the V_IRQ bit so that svm_intr_assist() can inject a
legitimate interrupt.

Signed-off-by: Travis Betak <travis.betak@amd.com>
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Signed-off-by: Tom Woller <thomas.woller@amd.com>
xen/arch/x86/hvm/svm/intr.c
xen/arch/x86/hvm/svm/svm.c